<template>

	<view class="">

		<!-- 头部滑动导航 -->
		<scroll-view scroll-x class="scroll-row " style="height: 80rpx;">
			<view style="height: 80rpx; line-height: 80rpx;" class="scroll-row-item  px-3" v-for="(item,index) in tabBars" :key='index'>
				<text class="font-md">{{item.name}}</text>

			</view>

		</scroll-view>


		<!-- 轮播图 -->
	
		<swiper-image :swipers='swipers' ></swiper-image>
	
		<!-- 分类导航 -->
		
		<index-nav  :indexnavs='indexnavs'></index-nav>
	
		<!-- 添加分割线 -->
		<divider></divider>
	
		<!-- 三张图片   -->
		
		<three-adv :threeAdv='threeAdv'></three-adv>
	
			
			<!-- 商品列表展示 -->

	<common-list  :commonList='commonList'></common-list>
				
	
	</view>


</template>

<script>
	
	

	
	
	
	import swiperImage from "@/components/index/swiper-image.vue";
	import indexNav from "@/components/index/index-nav.vue";
	import threeAdv from "@/components/index/three-adv.vue";
	
	// import card from "@/components/common/card.vue";
	
	import commonList from "@/components/common/common-list.vue";
	
	
	import {myIndexSwierpPathData} from '@/common/lib/myIndexUrl.js'
	
	
	export default {
		
		components:{
		
			swiperImage,
			indexNav,
			threeAdv,
			commonList
			
		},
		data() {
			return {
				price:1000,
				tabBars: [{
					name: '关注',
				}, {
					name: '推荐',
				}, {
					name: '体育',
				}, {
					name: '热点',
				}, {
					name: '财经',
				}, {
					name: '娱乐',
				}, {
					name: '军事',
				}, {
					name: '历史',
				}, {
					name: '本地',
				}],

				swipers: [{
						src: "../../static/images/demo/demo4.jpg"
					},
					{
						src: "../../static/images/demo/demo4.jpg"
					},
					{
						src: "../../static/images/demo/demo4.jpg"
					}
				],
				
			
				


				indexnavs: [{
						src: "/static/images/indexnav/1.png",
						text: "新品发布"
					},
					{
						src: "/static/images/indexnav/2.gif",
						text: "小米众筹"
					},
					{
						src: "/static/images/indexnav/3.gif",
						text: "以旧换新"
					},
					{
						src: "/static/images/indexnav/4.gif",
						text: "一分换团"
					},
					{
						src: "/static/images/indexnav/5.gif",
						text: "超值特卖"
					},
					{
						src: "/static/images/indexnav/6.gif",
						text: "小米秒杀"
					},
					{
						src: "/static/images/indexnav/7.gif",
						text: "真心想要"
					},
					{
						src: "/static/images/indexnav/8.gif",
						text: "电视热卖"
					},
					{
						src: "/static/images/indexnav/9.gif",
						text: "家电热卖"
					},
					{
						src: "/static/images/indexnav/10.gif",
						text: "米粉卡"
					},
				],

				threeAdv: {
					big: {
						src: "/static/images/demo/demo1.jpg"
					},
					smalltop: {
						src: "/static/images/demo/demo2.jpg"
					},
					smallbottom: {
						src: "/static/images/demo/demo2.jpg"
					},
				},

				commonList: [{
						cover: "/static/images/demo/list/1.jpg",
						title: "米家空调",
						desc: "1.5匹变频",
						oprice: 2699,
						pprice: 1399
					},
					{
						cover: "/static/images/demo/list/1.jpg",
						title: "米家空调",
						desc: "1.5匹变频",
						oprice: 2699,
						pprice: 1399
					},
					{
						cover: "/static/images/demo/list/1.jpg",
						title: "米家空调",
						desc: "1.5匹变频",
						oprice: 2699,
						pprice: 1399
					},
					{
						cover: "/static/images/demo/list/1.jpg",
						title: "米家空调",
						desc: "1.5匹变频",
						oprice: 2699,
						pprice: 1399
					},
					{
						cover: "/static/images/demo/list/1.jpg",
						title: "米家空调",
						desc: "1.5匹变频",
						oprice: 2699,
						pprice: 1399
					},
					{
						cover: "/static/images/demo/list/1.jpg",
						title: "米家空调",
						desc: "1.5匹变频",
						oprice: 2699,
						pprice: 1399
					}
				]

			}

		},
		onLoad() {

		},
		
		// 新版本 原生搜索功能实现方法   navigateTo 跳转 	
		onNavigationBarSearchInputClicked() {
					uni.navigateTo({
						url: "../search/search"
					})
		},
		methods: {

		},
		
		onReady() {
			// this.$api.get({url:mySwierpPathData}).then(res=>{
			// 	// console.log(res)
			// 	this.indexSwiper=res.data
			// 	// this.msg=res
			// })
			
		}
	}
</script>

<style>

</style>
